package study.method.base;

/**
 * 子类继承父类就会拥有父类的所有方法
 * @author Administrator
 * @date 2020/12/13
 */
public class Student extends Person{
    private String name = "学生";

    @Override
    public void print(){
        System.out.println("Student");
    }

    public void test(){
        print();
        this.print();
        super.print();
    }

    public static void main(String[] args) {
        Student student = new Student();
        student.test();
    }
}
